<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"i>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>司机基本信息表</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script>
var sel1;
var sel2;
var luntai,luntai1;
var s=[];
s[0]=['更换轮胎'];
s[1]=['发动机','高压油泵','大修','发电机','启动机','气泵','水箱','水泵','增压机','方向机'];
s[2]=['底盘','离合器','后桥','刹车系统','齿轮油'];
s[3]=['拖车','支架','刹车','轮骨轴头'];
s[4]=['更换机油'];
s[5]=['更换齿轮油'];
s[6]=['更换蓄电池'];
s[7]=['其他'];
function init(){
	sel1=document.getElementById('wxxm1');
	sel2=document.getElementById('wxxm2');
	luntai=document.getElementById('luntai');
	luntai1=document.getElementById('luntai1');
	for(var i=0;i<s.length;i++){
		var varItem = new Option(s[i][0],i);
		sel1.options.add(varItem);
	}
	for(i=1;i<s[0].length;i++){
		sel2.style.display='';
		var varItem = new Option(s[0][i],i);
		sel2.options.add(varItem);
	}
}
function select1(){
	var n=sel1.selectedIndex;
	if(sel1.options[n].text=='更换轮胎'){luntai.style.display='';luntai1.style.display='';}
	else {luntai.style.display='none';luntai1.style.display='none';}
	if(s[n].length<2){sel2.style.display='none';return;}//没有二级，隐藏sel2
	sel2.options.length=0;
	for(var i=1;i<s[n].length;i++){;
		var varItem = new Option(s[n][i],i);
		sel2.options.add(varItem);
	}	
	sel2.style.display='';
}
</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
  <table   width="100%"   border="0"   cellpadding="1"   cellspacing="1"   bgcolor="#CEDFF7">
    <tr>
      <td height="27" colspan="7" align="center" valign="bottom"   bgcolor="#CEDFF7" class="zt10">添加日常维修记录</td>
    </tr>
    <tr class="zt9">
      <td width="172" height="40" align="left"   bgcolor="#FFFFFF"><span class="zt9">　车号：
          <label>
            <input name="xm" type="text" id="xm" size="12" />
          </label>
      </span></td>
      <td width="213" height="40" align="left"   bgcolor="#FFFFFF"><span class="zt9">　司机姓名：
          <label>
            <input name="hj" type="text" id="hj" size="10" />
          </label>
      </span></td>
      <td height="40"   width='192' bgcolor="#FFFFFF">　里程表数：
      <input name="gls" type="text" id="gls" size="8" /></td>
      <td   width='170' bgcolor="#FFFFFF">　保养维修方式：
        <select name="wxxm3" id="wxxm3">
          <option>保养</option>
          <option>维修</option>
      </select></td>
      <td width="487" height="40" colspan="3"   bgcolor="#FFFFFF">　项目：
        <select name="wxxm1" id="wxxm1" onchange="select1(this);">
        </select>
　
<select name="wxxm2" id="wxxm2" style="display:none;">
</select></td>
    </tr>
    <tr>
      <td width="172" height="33" align="left"   bgcolor="#FFFFFF"><span class="zt9">　金额：
      
          <label>
            <input name="sfzhm" type="text" id="sfzhm" size="12" maxlength="18" />
          </label>
      </span></td>
      <td width="213" height="33" align="left"   bgcolor="#FFFFFF"><span class="zt9">　维修单位：
     
          <label>
            <input name="dabh" type="text" id="dabh" size="15" />
          </label>
      </span></td>
      <td height="33" colspan="5"   bgcolor="#FFFFFF"><span class="zt9">　
        </span><span class="zt9">日期：
          <label>
            <select name="nian" id="nian">
              <option>2008</option>
              <option>2009</option>
              <option>2010</option>
              <option>2011</option>
            </select>
            年
            <select name="yue" id="yue">
              <option>1</option>
              <option>2</option>
              <option>3</option>
              <option>4</option>
              <option>5</option>
              <option>6</option>
              <option>7</option>
              <option>8</option>
              <option>9</option>
              <option>10</option>
              <option>11</option>
              <option>12</option>
            </select>
            月
            <select name="ri" id="ri">
              <option>1</option>
              <option>2</option>
              <option>3</option>
              <option>4</option>
              <option>5</option>
              <option>6</option>
              <option>7</option>
              <option>8</option>
              <option>9</option>
              <option>10</option>
              <option>11</option>
              <option>12</option>
              <option>13</option>
              <option>14</option>
              <option>15</option>
              <option>16</option>
              <option>17</option>
              <option>18</option>
              <option>19</option>
              <option>20</option>
              <option>21</option>
              <option>22</option>
              <option>23</option>
              <option>24</option>
              <option>25</option>
              <option>26</option>
              <option>27</option>
              <option>28</option>
              <option>29</option>
              <option>30</option>
              <option>31</option>
            </select>
          </label>
      </span></td>
    </tr>
    <tr id='luntai'>
      <td width="172" height="34" align="left"   bgcolor="#FFFFFF"><span class="zt9">　轮胎：
      <input name="xm2" type="text" id="xm2" size="12" />
      </span></td>
      <td width="213" height="34" align="left"   bgcolor="#FFFFFF"><span class="zt9">　安装位置：      
          <select name="wxxm6" id="wxxm6">
            <option>主机1</option>
            <option>主机2</option>
            <option>主机3</option>
            <option>主机4</option>
            <option>主机5</option>
            <option>主机6</option>
            <option>拖车1</option>
            <option>拖车2</option>
            <option>拖车3</option>
            <option>拖车4</option>
            <option>拖车5</option>
            <option>拖车6</option>
            <option>拖车7</option>
            <option>拖车8</option>
            <option>拖车9</option>
            <option>拖车10</option>
            <option>拖车11</option>
            <option>拖车12</option>
          </select>
      </span></td>
      <td colspan="2"   bgcolor="#FFFFFF"><span class="zt9">　规格：
          <select name="gg" id="gg">
            <option>900-20</option>
            <option>1000-20</option>
            <option>1100-20</option>
          </select>
      </span></td>
      <td colspan="3" rowspan="2"   bgcolor="#FFFFFF"><p class="zt9">&nbsp;</p>
      <p class="zt9">&nbsp;</p></td>
    </tr>
    <tr id='luntai1'>
      <td height="29" align="left"   bgcolor="#FFFFFF"><span class="zt9">　数量：
          <input name="gls3" type="text" id="gls3" size="12" />
      </span></td>
      <td width="213" height="29" align="left"   bgcolor="#FFFFFF"><span class="zt9">　单价：
          <input name="gls5" type="text" id="gls5" size="12" />
      </span></td>
      <td colspan="2"   bgcolor="#FFFFFF"><span class="zt9">　胎号：
          <input name="gls4" type="text" id="gls4" size="12" />
      </span></td>
    </tr>
    <tr>
      <td colspan="7" align="center"   bgcolor="#FFFFFF"><span class="zt9">
        <label>
          <input type="submit" name="tj" id="tj" value="添加日常维修记录" />
          　　　　
          <input type="reset" name="CZXX" id="CZXX" value="重置内容" />
        </label>
      </span></td>
    </tr>
  </table>
</form>
</body>
</html>
<script>init();</script>